<?php

/**
 * 
 */
class Menu extends InheritableActiveRecord {
	
	public function relations()
	{
		Yii::import('menu.models.MenuItem');
		return array(
			'items'=>array(self::HAS_MANY, 'MenuItem', 'menu_id', 'order'=>'items.sequence_number ASC'),
			'super'=>array(self::BELONGS_TO, 'WidgetInstance', 'id'),
		);
		
	}
	
	
	public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }
	
	public function tableName()
	{
		return '{{menu}}';
	}
}
